// eslint-disable-next-line
<template>
  <div id="index">
    <dv-full-screen-container class="bg">
      <dv-loading v-if="loading">Loading...</dv-loading>
      <div v-else class="host-body">

        <!-- 看板头部 -->
        <div class="d-flex jc-center">
          <dv-decoration-10 style="width:33.3%;height:.0625rem;" />
          <div class="d-flex jc-center">
            <dv-decoration-8 :color="['#568aea', '#000000']" style="width:2.5rem;height:.625rem;" />
            <div class="title">
              <span class="title-text">大数据可视化平台</span>
              <dv-decoration-6
                class="title-bototm"
                :reverse="true"
                :color="['#50e3c2', '#67a1e5']"
                style="width:3.125rem;height:.1rem;"
              />
            </div>
            <dv-decoration-8
              :reverse="true"
              :color="['#568aea', '#000000']"
              style="width:2.5rem;height:.625rem;"
            />
          </div>
          <dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" />
        </div>

        <!-- 第二行 -->
        <!-- <div class="d-flex jc-between px-2">
          <div class="d-flex" style="width: 40%">
            <div
              class="react-right ml-4"
              style="width: 6.25rem; text-align: left;background-color: #0f1325;"
            >
              <span class="react-before"></span>
              <span class="text">数据分析1</span>
            </div>
            <div class="react-right ml-3" style="background-color: #0f1325;">
              <span class="text colorBlue">数据分析2</span>
            </div>
          </div>
          <div style="width: 40%" class="d-flex">
            <div class="react-left bg-color-blue mr-3">
              <span class="text fw-b">vue-big-screen</span>
            </div>
            <div
              class="react-left mr-4"
              style="width: 6.25rem; background-color: #0f1325; text-align: right;"
            >
              <span class="react-after"></span>
              <span class="text">2020年03月16日 周一 12:00</span>
            </div>
          </div>
        </div> -->

        <div class="body-box">

          <!-- 左边主体 -->
          <div class="left-box">
             <div class="panel">
              <pie />
              <div class="panel-under"></div>
            </div>

            <div class="panel">
              <centerLeft1 />
              <div class="panel-under"></div>
            </div>
          </div>

          <!-- 中间主体 -->
          <div class="center-box">
            
            <!-- 中间头部 -->
            <div class="center-hd">
              <ul style="font-family: 'DIGITALDREAMFAT';font-size: 0.225rem;color:#fff;margin:auto 0">
                <li v-for="(item,index) in numberData" :key="index">{{item.text}}</li>
              </ul>
              <ul>
                <li v-for="(item,index) in numberData" :key="index">
                  <dv-digital-flop :config="item.number" style="height: 1rem" />
                </li>
              </ul>
            </div>

            <!-- 中间主体 -->
            <div class="center-bd">
              <bubbleMap />
              <div class="center-bd-bg">
                <img src="../../assets/img/jt.png" style="width:100%;height:100%">
              </div>
              <div class="panel-under"></div>
            </div>
          </div>

          <!-- 右边主体 -->
          <div class="right-box">

            <div class="panel">
              <carousel />
              <div class="panel-under"></div>
            </div>

            <div class="panel">
              <capsule />
              <div class="panel-under"></div>
            </div>

            <div class="panel">
              <carousel />
              <div class="panel-under"></div>
            </div>
            
          </div>
        </div>
      </div>
    </dv-full-screen-container>
  </div>
</template>

<script>
import centerLeft1 from "./components/centerLeft1";
import myMap from './components/map'
import carousel from './components/carousel'
import capsule from './components/capsule'
import pie from './components/pie1'
import bubbleMap from './components/bubble-map'
// import centerLeft2 from "./centerLeft2";
// import centerRight1 from "./centerRight1";
// import centerRight2 from "./centerRight2";
// import center from "./center";
// import bottomLeft from "./bottomLeft";
// import bottomRight from "./bottomRight";
export default {
  data() {
    return {
      loading: true,
      config:{
        radius: '70%',
        activeRadius: 65,
        digitalFlopStyle: {
          fontSize: 20,
          fill: '#fff'
        },
        data: [
          {
            name: '周口',
            value: 55
          },
          {
            name: '南阳',
            value: 120
          },
          {
            name: '西峡',
            value: 78
          },
          {
            name: '驻马店',
            value: 66
          },
          {
            name: '新乡',
            value: 80
          }
        ]
      },
      config1: {
        data: [66]
      },
      numberData: [
        {
          number: {
            number: [15],
            toFixed: 1,
            content: "{nt} 段"
          },
          text: "今日会话数"
        },
        {
          number: {
            number: [1144],
            toFixed: 1,
            content: "{nt} 人"
          },
          text: "今日客户数"
        },
        {
          number: {
            number: [361],
            toFixed: 1,
            content: "{nt} 个"
          },
          text: "今日商品数"
        },
        {
          number: {
            number: [157],
            toFixed: 1,
            content: "{nt} 单"
          },
          text: "今日成交数"
        }
      ]
    };
  },
  components: {
    centerLeft1,
    myMap,
    carousel,
    capsule,
    pie,
    bubbleMap
    // centerLeft2,
    // centerRight1,
    // centerRight2,
    // center,
    // bottomLeft,
    // bottomRight
  },
  mounted() {
    this.cancelLoading();
    setInterval(() => {
      this.changeNumber()
    }, 3000);
  },
  methods: {
    cancelLoading() {
      setTimeout(() => {
        this.loading = false
      }, 500);
    },
    changeNumber() {
      this.numberData.forEach((item, index) => {
        item.number.number[0] += ++index;
        item.number = { ...item.number };
      });
    }
  }
};
</script>

<style lang="scss">
</style>